package cn.lzh.service;

import cn.lzh.entity.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface BookService {

    public List<Book> findAll();//
    public  Book findById(int id);
    public void  add(Book book);
    public void update(Book b);
    public  List<Book> findPage(@Param("start") int start, @Param("num") int num, @Param("typeid") int typeid);
    public  int getCount(int typeid);

    List<Book> findByName(@Param("name") String name, @Param("start") int start, @Param("num") int num);

    public  int getCountByName(@Param("name") String name);

    public List<Book> findSale5();
    public  List<Book> findFav5();
    public List<Book> findRate5() ;
    List<Book> findPageRate(@Param("start") int start, @Param("num") int num, @Param("typeid") int typeid);


    List<Book> findPageSale(@Param("start") int start, @Param("num") int num, @Param("typeid") int typeid);

    List<Book> findPageFav(@Param("start") int start, @Param("num") int num, @Param("typeid") int typeid);
}
